<html>
<head><meta charset="utf-8"><title>subset-outlives-what-fun · t-compiler/wg-nll · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/index.html">t-compiler/wg-nll</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/subset-outlives-what-fun.html">subset-outlives-what-fun</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="126415704"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/subset-outlives-what-fun/near/126415704" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/subset-outlives-what-fun.html#126415704">(May 11 2018 at 13:50)</a>:</h4>
<p><span class="user-mention" data-user-id="116266">@Santiago Pastorino</span> ok so —</p>



<a name="126415707"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/subset-outlives-what-fun/near/126415707" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/subset-outlives-what-fun.html#126415707">(May 11 2018 at 13:50)</a>:</h4>
<p>regarding the origin of those rules in the blog post</p>



<a name="126415711"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/subset-outlives-what-fun/near/126415711" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/subset-outlives-what-fun.html#126415711">(May 11 2018 at 13:50)</a>:</h4>
<p>I guess the question was: if we have <code>R1: R2</code>, why do that translate to <code>R1 &lt;= R2</code> and not <code>R2 &lt;= R1</code>?</p>



<a name="126415713"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/subset-outlives-what-fun/near/126415713" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/subset-outlives-what-fun.html#126415713">(May 11 2018 at 13:50)</a>:</h4>
<p>in terms of sets of loans?</p>



<a name="126415722"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/subset-outlives-what-fun/near/126415722" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/subset-outlives-what-fun.html#126415722">(May 11 2018 at 13:51)</a>:</h4>
<p>and in particular how should we think about that with "outlives"?</p>



<a name="126415735"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/subset-outlives-what-fun/near/126415735" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/subset-outlives-what-fun.html#126415735">(May 11 2018 at 13:51)</a>:</h4>
<p>first off, what I <em>personally</em> find useful is to read <code>R1: R2</code> as "data with region R1 flows into region R2"</p>



<a name="126415780"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/subset-outlives-what-fun/near/126415780" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/subset-outlives-what-fun.html#126415780">(May 11 2018 at 13:52)</a>:</h4>
<p>so e.g. if you have</p>
<div class="codehilite"><pre><span></span>let x: &amp;&#39;0 i32 = ...
let y: &amp;&#39;1 i32 = x;
</pre></div>


<p>then this results in <code>'0: '1</code>, because data with region <code>'0</code> was stored into <code>y</code>, which has region <code>'1</code></p>



<a name="126415789"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/subset-outlives-what-fun/near/126415789" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/subset-outlives-what-fun.html#126415789">(May 11 2018 at 13:52)</a>:</h4>
<p>but outlives is of course also a reasonable way to think of it: in that case, the idea is that the "source" of the data must outlive the target</p>



<a name="126415797"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/subset-outlives-what-fun/near/126415797" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/subset-outlives-what-fun.html#126415797">(May 11 2018 at 13:53)</a>:</h4>
<p>anyway, now back to loans: the idea is that each region can be mapped to a set of loans <code>{L}</code> which may be the source of the referenced data</p>



<a name="126415803"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/subset-outlives-what-fun/near/126415803" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/subset-outlives-what-fun.html#126415803">(May 11 2018 at 13:53)</a>:</h4>
<p>that is, if you have <code>&amp;'0 u32</code>, and <code>'0</code> maps to <code>{L1, L2}</code>, then we know that that reference <em>may</em> have been created by the loan L1 or L2, and hence if we invalidate the terms of either loan (e.g., by mutating or accessing the path that was borrowed), then we can't use the reference anymore</p>



<a name="126415847"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/subset-outlives-what-fun/near/126415847" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/subset-outlives-what-fun.html#126415847">(May 11 2018 at 13:54)</a>:</h4>
<p>anyway so if you think about it as data flow, then perhaps the <code>&lt;=</code> makes sense: that is, in our example, <code>y</code> was assigned from <code>x</code> (and maybe from other things), so it points to anything that <code>x</code> can point at (and maybe other things)</p>



<a name="126415861"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/subset-outlives-what-fun/near/126415861" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/subset-outlives-what-fun.html#126415861">(May 11 2018 at 13:55)</a>:</h4>
<p>if we think about it in terms of "outlives", the key point is that references "live longer" by having fewer loans</p>



<a name="126415863"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/subset-outlives-what-fun/near/126415863" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/subset-outlives-what-fun.html#126415863">(May 11 2018 at 13:55)</a>:</h4>
<p>because there are fewer ways to invalidate them</p>



<a name="126415867"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/subset-outlives-what-fun/near/126415867" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/subset-outlives-what-fun.html#126415867">(May 11 2018 at 13:55)</a>:</h4>
<p>so since <code>'0</code> <em>outlives</em> <code>'1</code>, it must be smaller than <code>'1</code> ("contain" fewer loans)</p>



<a name="126415925"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/subset-outlives-what-fun/near/126415925" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/subset-outlives-what-fun.html#126415925">(May 11 2018 at 13:56)</a>:</h4>
<p><span class="user-mention" data-user-id="116266">@Santiago Pastorino</span> does that explain it?</p>



<a name="126416068"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/subset-outlives-what-fun/near/126416068" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/subset-outlives-what-fun.html#126416068">(May 11 2018 at 14:01)</a>:</h4>
<p>I was also confused by this :) (possibly because I once thought they were sets of _points_ not of loans; more points being the subset was confusing)" — it's clear now</p>



<a name="126416410"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/subset-outlives-what-fun/near/126416410" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/subset-outlives-what-fun.html#126416410">(May 11 2018 at 14:10)</a>:</h4>
<blockquote>
<p>anyway, now back to loans: the idea is that each region can be mapped to a set of loans <code>{L}</code> which may be the source of the referenced data</p>
</blockquote>
<p>remember me about this, I may be confusing again some concepts, a regions maps to a set of loans, explain a bit more :)</p>



<a name="126416461"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/subset-outlives-what-fun/near/126416461" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/subset-outlives-what-fun.html#126416461">(May 11 2018 at 14:12)</a>:</h4>
<p>a Loan have one region but a region can have more than one Loan</p>



<a name="126416471"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/subset-outlives-what-fun/near/126416471" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/subset-outlives-what-fun.html#126416471">(May 11 2018 at 14:12)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> was that what you meant?</p>



<a name="126416489"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/subset-outlives-what-fun/near/126416489" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/subset-outlives-what-fun.html#126416489">(May 11 2018 at 14:12)</a>:</h4>
<p>loans don't have regions; regions map to a set of loans, however, that they <em>depend on</em> (meaning: for the reference to remain valid, the terms of the loan must be respected)</p>



<a name="126416499"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/subset-outlives-what-fun/near/126416499" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/subset-outlives-what-fun.html#126416499">(May 11 2018 at 14:13)</a>:</h4>
<p>I guess you could say a loan has a region in the form of the <code>borrow_region</code> predicate</p>



<a name="126416506"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/subset-outlives-what-fun/near/126416506" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/subset-outlives-what-fun.html#126416506">(May 11 2018 at 14:13)</a>:</h4>
<p>in which case what you wrote seems right</p>



<a name="126416519"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/subset-outlives-what-fun/near/126416519" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/subset-outlives-what-fun.html#126416519">(May 11 2018 at 14:13)</a>:</h4>
<p>(hmm, I may have called <code>borrow_region</code> something else in the blog post, I can't remember)</p>



<a name="126416571"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/subset-outlives-what-fun/near/126416571" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/subset-outlives-what-fun.html#126416571">(May 11 2018 at 14:14)</a>:</h4>
<p>it's borrow_region</p>



<a name="126416575"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/subset-outlives-what-fun/near/126416575" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/subset-outlives-what-fun.html#126416575">(May 11 2018 at 14:14)</a>:</h4>
<p>point is, when you have a <code>&amp;'a foo</code> expression, that produces a loan <code>L</code>, and <code>{L} &lt;= 'a</code></p>



<a name="126416578"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/subset-outlives-what-fun/near/126416578" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/subset-outlives-what-fun.html#126416578">(May 11 2018 at 14:14)</a>:</h4>
<p>so there is some relationship between <code>L</code> and <code>'a</code></p>



<a name="126416586"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/subset-outlives-what-fun/near/126416586" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/subset-outlives-what-fun.html#126416586">(May 11 2018 at 14:14)</a>:</h4>
<p>that is, some mapping from <code>L</code> to the region <code>'a</code> (but <code>'a</code> may map to many loans)</p>



<a name="126416587"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/subset-outlives-what-fun/near/126416587" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/subset-outlives-what-fun.html#126416587">(May 11 2018 at 14:14)</a>:</h4>
<p>yep</p>



<a name="126416602"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/subset-outlives-what-fun/near/126416602" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/subset-outlives-what-fun.html#126416602">(May 11 2018 at 14:15)</a>:</h4>
<p>it's probably just <code>outlives</code>named differently (<code>base_subset</code>)</p>



<a name="126416724"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/subset-outlives-what-fun/near/126416724" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/subset-outlives-what-fun.html#126416724">(May 11 2018 at 14:18)</a>:</h4>
<blockquote>
<p>if we think about it in terms of "outlives", the key point is that references "live longer" by having fewer loans<br>
because there are fewer ways to invalidate them<br>
so since '0 outlives '1, it must be smaller than '1 ("contain" fewer loans)</p>
</blockquote>
<p>I understand all this, but dunno how to explain, feels weird :P</p>



<a name="126416759"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/subset-outlives-what-fun/near/126416759" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/subset-outlives-what-fun.html#126416759">(May 11 2018 at 14:19)</a>:</h4>
<p>seems to me that is defined to be a subset because probabilistically it could live longer?</p>



<a name="126416773"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/subset-outlives-what-fun/near/126416773" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/subset-outlives-what-fun.html#126416773">(May 11 2018 at 14:19)</a>:</h4>
<p>(so does it make sense now?) =)</p>



<a name="126416774"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/subset-outlives-what-fun/near/126416774" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/subset-outlives-what-fun.html#126416774">(May 11 2018 at 14:19)</a>:</h4>
<p>well anyway feel free to ask more questions if not..</p>



<a name="126416780"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/subset-outlives-what-fun/near/126416780" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/subset-outlives-what-fun.html#126416780">(May 11 2018 at 14:19)</a>:</h4>
<p>there are fewer ways to invalidate but that doesn't mean it will be invalidated</p>



<a name="126416830"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/subset-outlives-what-fun/near/126416830" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/subset-outlives-what-fun.html#126416830">(May 11 2018 at 14:20)</a>:</h4>
<p>it's kind of I follow but it doesn't click properly</p>



<a name="126416849"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/subset-outlives-what-fun/near/126416849" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/subset-outlives-what-fun.html#126416849">(May 11 2018 at 14:20)</a>:</h4>
<p>if you define smaller because it have fewer loans I follow</p>



<a name="126416859"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/subset-outlives-what-fun/near/126416859" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/subset-outlives-what-fun.html#126416859">(May 11 2018 at 14:21)</a>:</h4>
<p>but in that phrase it confuses me that you used a notion of probability of things to define something</p>



<a name="126416861"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/subset-outlives-what-fun/near/126416861" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/subset-outlives-what-fun.html#126416861">(May 11 2018 at 14:21)</a>:</h4>
<p>and I find that a bit odd</p>



<a name="126416922"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/subset-outlives-what-fun/near/126416922" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/subset-outlives-what-fun.html#126416922">(May 11 2018 at 14:22)</a>:</h4>
<blockquote>
<p>but in that phrase it confuses me that you used a notion of probability of things to define something</p>
</blockquote>
<p>probability?</p>



<a name="126416935"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/subset-outlives-what-fun/near/126416935" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/subset-outlives-what-fun.html#126416935">(May 11 2018 at 14:23)</a>:</h4>
<blockquote>
<p>there are fewer ways to invalidate but that doesn't mean it will be invalidated</p>
</blockquote>
<p>indeed, the compiler is always <em>conservative</em> in these respects -- i.e., if something bad <em>could</em> happen, it assumes it <em>will</em> happen</p>



<a name="126416940"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/subset-outlives-what-fun/near/126416940" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/subset-outlives-what-fun.html#126416940">(May 11 2018 at 14:23)</a>:</h4>
<p>if that is a problem then you have to refine the analysis so that it can see that it will not happen</p>



<a name="126416983"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/subset-outlives-what-fun/near/126416983" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/subset-outlives-what-fun.html#126416983">(May 11 2018 at 14:24)</a>:</h4>
<p>which is basically what we are trying to do by moving to NLL :) (that is, we are refining the existing analysis to be more precise)</p>



<a name="126417239"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/subset-outlives-what-fun/near/126417239" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/subset-outlives-what-fun.html#126417239">(May 11 2018 at 14:30)</a>:</h4>
<p><span class="emoji emoji-1f44d" title="+1">:+1:</span></p>



<a name="126417253"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/subset-outlives-what-fun/near/126417253" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/subset-outlives-what-fun.html#126417253">(May 11 2018 at 14:30)</a>:</h4>
<p>so the definition of subset is because it have fewer loans, right?</p>



<a name="126417263"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/subset-outlives-what-fun/near/126417263" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/subset-outlives-what-fun.html#126417263">(May 11 2018 at 14:31)</a>:</h4>
<p>if it's that I understood and previously I may have understood some parts of your english in a wrong way :P</p>



<a name="126417264"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/subset-outlives-what-fun/near/126417264" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/subset-outlives-what-fun.html#126417264">(May 11 2018 at 14:31)</a>:</h4>
<p>it's always hard to follow ;)</p>



<a name="126417720"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/subset-outlives-what-fun/near/126417720" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/subset-outlives-what-fun.html#126417720">(May 11 2018 at 14:43)</a>:</h4>
<p>Sounds right</p>



<a name="126427754"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/subset-outlives-what-fun/near/126427754" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/subset-outlives-what-fun.html#126427754">(May 11 2018 at 18:37)</a>:</h4>
<p>ok <span class="user-mention" data-user-id="116266">@Santiago Pastorino</span> was asking me about the "dumped tuples"</p>



<a name="126427759"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/subset-outlives-what-fun/near/126427759" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/subset-outlives-what-fun.html#126427759">(May 11 2018 at 18:37)</a>:</h4>
<p>and what that's all about</p>



<a name="126427793"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/subset-outlives-what-fun/near/126427793" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/subset-outlives-what-fun.html#126427793">(May 11 2018 at 18:38)</a>:</h4>
<p>in the blog post, I talked about these "base inputs"</p>



<a name="126427811"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/subset-outlives-what-fun/near/126427811" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/subset-outlives-what-fun.html#126427811">(May 11 2018 at 18:38)</a>:</h4>
<p>e.g., <code>cfg_edge</code></p>



<a name="126427820"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/subset-outlives-what-fun/near/126427820" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/subset-outlives-what-fun.html#126427820">(May 11 2018 at 18:38)</a>:</h4>
<p>right now the compiler has been instrumented to dump out these tuples if you pass <code>-Znll-facts</code></p>



<a name="126427824"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/subset-outlives-what-fun/near/126427824" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/subset-outlives-what-fun.html#126427824">(May 11 2018 at 18:38)</a>:</h4>
<p>they are the starting points for the analysis</p>



<a name="126427857"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/subset-outlives-what-fun/near/126427857" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/subset-outlives-what-fun.html#126427857">(May 11 2018 at 18:39)</a>:</h4>
<p>actually <span class="user-mention" data-user-id="116266">@Santiago Pastorino</span> I'm not <em>quite</em> sure what you wanted to know</p>



<a name="126427858"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/subset-outlives-what-fun/near/126427858" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/subset-outlives-what-fun.html#126427858">(May 11 2018 at 18:39)</a>:</h4>
<p>:P</p>



<a name="126427918"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/subset-outlives-what-fun/near/126427918" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/subset-outlives-what-fun.html#126427918">(May 11 2018 at 18:40)</a>:</h4>
<p>but you can see an example <a href="https://github.com/rust-lang-nursery/borrow-check/tree/master/inputs/issue-47680" target="_blank" title="https://github.com/rust-lang-nursery/borrow-check/tree/master/inputs/issue-47680">here, in the borrow-check repo</a></p>



<a name="126427929"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/subset-outlives-what-fun/near/126427929" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/subset-outlives-what-fun.html#126427929">(May 11 2018 at 18:41)</a>:</h4>
<p>this is the <a href="https://github.com/rust-lang-nursery/borrow-check/tree/master/inputs/issue-47680" target="_blank" title="https://github.com/rust-lang-nursery/borrow-check/tree/master/inputs/issue-47680">input rust file</a> -- it's just there for reference, the <code>borrow-check</code> program itself never looks at it</p>



<a name="126427937"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/subset-outlives-what-fun/near/126427937" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/subset-outlives-what-fun.html#126427937">(May 11 2018 at 18:42)</a>:</h4>
<p>for each function in the program, we <a href="https://github.com/rust-lang-nursery/borrow-check/tree/master/inputs/issue-47680/nll-facts/%7B%7Bimpl%7D%7D-maybe_next" target="_blank" title="https://github.com/rust-lang-nursery/borrow-check/tree/master/inputs/issue-47680/nll-facts/%7B%7Bimpl%7D%7D-maybe_next">create a directory</a></p>



<a name="126427974"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/subset-outlives-what-fun/near/126427974" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/subset-outlives-what-fun.html#126427974">(May 11 2018 at 18:42)</a>:</h4>
<p>in there are several files</p>



<a name="126427983"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/subset-outlives-what-fun/near/126427983" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/subset-outlives-what-fun.html#126427983">(May 11 2018 at 18:42)</a>:</h4>
<p>e.g. <a href="https://github.com/rust-lang-nursery/borrow-check/blob/master/inputs/issue-47680/nll-facts/%7B%7Bimpl%7D%7D-maybe_next/cfg_edge.facts" target="_blank" title="https://github.com/rust-lang-nursery/borrow-check/blob/master/inputs/issue-47680/nll-facts/%7B%7Bimpl%7D%7D-maybe_next/cfg_edge.facts"><code>cfg_edge.facts</code></a></p>



<a name="126427985"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/subset-outlives-what-fun/near/126427985" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/subset-outlives-what-fun.html#126427985">(May 11 2018 at 18:42)</a>:</h4>
<p>each line is a tuple, and the individual fields of the tuple are tab-separated</p>



<a name="126429510"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/subset-outlives-what-fun/near/126429510" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/subset-outlives-what-fun.html#126429510">(May 11 2018 at 19:19)</a>:</h4>
<p>hey, sorry for the delay</p>



<a name="126429555"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/subset-outlives-what-fun/near/126429555" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/subset-outlives-what-fun.html#126429555">(May 11 2018 at 19:20)</a>:</h4>
<p>yes, makes perfect sense</p>



<a name="126429571"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/subset-outlives-what-fun/near/126429571" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/subset-outlives-what-fun.html#126429571">(May 11 2018 at 19:20)</a>:</h4>
<p>and sorry to the rest of the people here, I've just read Niko's blog, so still catching up :)</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>